﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MINERP.MODEL.FoundationModel;

namespace MINERP.BLL.InnerReturn
{
    public class PhotoView
    {
        /// <summary>
        /// 照片信息
        /// </summary>
        public PhotoInfo_Info Photo { get; set; }
        /// <summary>
        /// 产品信息
        /// </summary>
        public OrderInfo_Info Product { get; set; }

        public int PhotoId
        {
            get { return Photo.PhotoId; }
        }

        public string PhotoBarCode
        {
            get { return Photo.PhotoBarCode; }
        }
        public string Size
        {
            get
            {
                return Photo.Width.ToString("0.00") + "×" + Photo.Height.ToString("0.00") + "(" + (Photo.Width*2.54).ToString("0.00")+"×"+(Photo.Height*2.54).ToString("0.00")+"cm"+ ")";
            }
        }
        public string PhotoName
        {
            get
            {
                return Photo.PhotoName;
            }
        }
        public double Heigth
        {
            get
            {
                return Photo.Height;
            }
        }
        public double Width
        {
            get
            {
                return Photo.Width;
            }
        }
        public string OrderProductName
        {
            get { return Product.OrderProductName; }
        }
        public int OrderProductId
        {
            get { return Product.OrderProductId; }
        }
        public string OrderProductCode
        {
            get { return Product.OrderProductCode; }
        }

        public string picPath
        {
            get { return Photo.PicPath; }
        }
        public User_Info DutyMan//责任人
        {
            get;
            set;
        }
        public User_Info CreateMan//返工人
        {
            get;
            set;
        }

        public string DutyManName
        {
            get { return DutyMan.UserName; }
        }
        public string CreateManName
        {
            get { return CreateMan.UserName; }
        }
        public Tb_Tech_Info TechFrom { get; set; }
        public Tb_Tech_Info TechTo { get; set; }
        public string TechFromName { get { return TechFrom.TechName; } }
        public string TechToName { get { return TechTo.TechName; } }
        //public List<Tb_Tech_Info> TechList { get; set; }
        public List<FlowView> ListFlow { get; set; }
        public string Remark{set;get;}
    }
    public class FlowView
    {
        /// <summary>
        /// 流程 信息
        /// </summary>
        public WorkOrderFlowList_Info Flow { get; set; }
        /// <summary>
        /// 节点信息
        /// </summary>
        public Tb_Tech_Info Tech { get; set; }

       
        public int WorkFlowListId
        {
            get
            {
                return Flow.WorkFlowListId;
            }

        }
        
        public string TechName
        {
            get
            {
                return Tech.TechName;
            }
        }
        public int TechId
        {
            get
            {
                return Tech.TechId;
            }
        }
        public int UserId
        {
            get
            {
                return Flow.UserId;
            }
        }
        public string UserName
        { get; set; }
        public int WorkOrder
        {
            get { return Flow.WorkOrder; }
        }
    }
}
